package com.zjmzxfzhl.modules.app.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zjmzxfzhl.common.core.base.BaseEntity;
import com.zjmzxfzhl.common.core.validator.constraints.LengthForUtf8;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotNull;

import com.zjmzxfzhl.modules.app.form.DocFilePath;
import com.zjmzxfzhl.modules.sys.entity.SysUser;
import lombok.Data;

/**
 * 【】实体类
 * 
 * @author 张森荣
 */
@Data
@TableName("T_APP_STOCK")
public class AppStock extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId
//    @NotNull
    @LengthForUtf8(max = 32)
    private String stockId;

    /**
     * 库存描述
     */
    private String content;

    /**
     * 物料名称
     */
    @NotNull
    @LengthForUtf8(max = 32)
    private String bomName;


    /**
     * 物料编号
     */
    @NotNull
    @LengthForUtf8(max = 50)
    private String bomSn;

    /**
     * 类型
     */
    @NotNull
    @LengthForUtf8(max = 2)
    private String stockType;

    /**
     * 数量
     */
    @NotNull
//    @DecimalMax("")
    private BigDecimal quantity;

    /**
     * 产品ID
     */
    @LengthForUtf8(max = 32)
    private String prodId;

    @TableField(exist = false)
    private List<SysUser> userList =new ArrayList<>();

    /**
     * 添加时传入附件
     */
    @TableField(exist = false)
    private List<DocFilePath> docFilePath= new ArrayList<>();
}